package com.ef.service;

import java.util.Date;
import java.util.List;

import com.ef.constant.EClassEntityType;
import com.ef.domain.ClassEntity;
import com.ef.domain.User;
import com.ef.web.domain.CardInfo;

public interface ClassBookingService extends BaseService {
	/**
	 * 是否可以进行booking
	 * 
	 * @param entityId
	 *            class 的 Id
	 * @param leadsId
	 *            leads 的 Id
	 * @return null, 可以直接订课 WARNING: 需要确认. ERROR:不允许进行订课.
	 */
	public String isCanDoBookingNormal(ClassEntity classEntity, Long leadsId,
			int year, int week, String confirm, String order, String comments);

	public String isCanDoBookingPSA(ClassEntity classEntity, Long leadsId,
			int year, int week, String confirm, String order, String comments);

	public String isCanDoBookingVIP(ClassEntity classEntity, Long leadsId,
			int year, int week, String confirm);

	public String isCanDoBookingFreeF2F(ClassEntity classEntity, Long leadsId,
			int year, int week, String confirm);

	public String isCanCancel(Long entityId, Long leadsId, int year, int week,
			String confirm);

	public String isCanDoBooking(EClassEntityType type, Long entityId,
			Long leadsId, int year, int week, String confirm, String order,
			String comments) throws Exception;

	public String isCanChangeStatusToBooking(Long leadsClassEntityId,
			String confirm) throws Exception;

	/**
	 * 完成订课.
	 * 
	 * @param entityId
	 * @param leadsId
	 * @return
	 */
	public String doBooking(Long entityId, Long leadsId, EClassEntityType type,
			User user, String order, String comments);

	public String changeWaitingToBooking(Long leadsClassEntityId,
			EClassEntityType type, User user);
	
	public String changeAbsenceToCancel(Long leadsClassEntityId, User user);

	public String doCancel(Long entityId, Long leadsId, User user);

	public void doCheckin(ClassEntity classEntiy, String leadsClassEntityId,
			User user);
	
	public List<CardInfo> bookingStudentsInfo(Date today,String classEntityType,String classType);

}
